﻿@{
    Layout = "~/Views/Shared/_Index.cshtml";
}

<div class="wrapper animated fadeInRight">
    <div class="row">
        <div class="col-sm-12 select-table table-striped">
            <table id="gridTable" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>

<script type="text/javascript">
    var id = ys.request("id");
    $(function () {
        var queryUrl = '@Url.Content("~/ExperimentManage/ExperimentFlow/GetPageListJson")' + '?ExperimentDataId=' + id;
        $('#gridTable').ysTable({
            url: queryUrl,
            columns: [
                { field: 'Id', title: 'Id', visible: false },
                { field: 'BaseCreatorName', title: '操作人' },
                { field: 'BaseCreateTime', title: '日期', formatter: function (value, row, index) { return new Date(value).toLocaleString(); } },
                { field: 'ExperimentDataId', title: '试验id' },
                {
                    field: 'Status', title: '状态', formatter: function (value, row, index) {
                        var str = "";
                        switch (value) {
                            case 0:
                                str = "待提交";
                                break;
                            case 1:
                                str = "待审核";
                                break;
                            case 2:
                                str = "审核拒绝";
                                break;
                            case 3:
                                str = "待批准";
                                break;
                            case 4:
                                str = "已批准";
                                break;
                        }
                        return str;
                    }
                },
                { field: 'Remark', title: '备注' }
            ],
            queryParams: function (params) {
                var pagination = $('#gridTable').ysTable('getPagination', params);
                var queryString = $('#searchDiv').getWebControls(pagination);
                return queryString;
            }
        });
    });
</script>

